package com.sm.sales_management.service.impl;

import com.sm.sales_management.domain.Purchasegoods;
import com.sm.sales_management.mapper.PurchasegoodsMapper;
import com.sm.sales_management.service.IPurchasegoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PurchasegoodsServiceImpl implements IPurchasegoodsService {

    @Autowired
    PurchasegoodsMapper purchasegoodsMapper;
    @Override
    public List<Purchasegoods> selectAllPurchasegoods() {
        return purchasegoodsMapper.selectAllPurchasegoods();
    }

    @Override
    public Integer delete(int id) {
        return purchasegoodsMapper.delete(id);
    }

    @Override
    public Integer updatePurchasegoods(Purchasegoods purchasegoods) {
        return purchasegoodsMapper.updatePurchasegoods(purchasegoods);
    }

    @Override
    public Integer insertPurchasegoods(Purchasegoods purchasegoods) {
        return purchasegoodsMapper.insertPurchasegoods(purchasegoods);
    }
}
